MQTT Essentials - A Lightweight IoT Protocol by Gaston C. Hillar
Author:Gaston C. Hillar [Hillar, Gaston C.]
Language: eng
Format: azw3, pdf
Publisher: Packt Publishing
Published: 2017-04-14T04:00:00+00:00
In MQTT.fx, click Publish and enter commands/drone01 in the dropdown on the left-hand side of the Publish button. Click QoS 2 because we want to use a QoS level of 2.
Enter the following text in the textbox below the Publish button: {"COMMAND": "SET_MAX_ALTITUDE", "FEET": 20}.
Then, click the Publish button. MQTT.fx will publish the entered text to the specified topic with a QoS level of 2.
Go to the window in which you can see the output generated by the Python code. In case you are running the code in an IoT board, you might be using an SSH Terminal. In case you are running the code on your local computer, go to the Terminal or Command Prompt, based on the operating system you are using. You will see the following output:
Connected to the MQTT server I've received the following message: {"COMMAND": "SET_MAX_ALTITUDE", "FEET": 20} drone01: Setting maximum altitude to 20 feet
The code has received the message with the command, the Drone instance executed the set_max_altitude method with 20 as an argument, and the output displays the results of executing this code.
Go back to MQTT.fx, click Subscribe, and you will see a new message has arrived to the processedcommands/drone01 topic with the following payload: {"SUCCESSFULLY_PROCESSED_COMMAND": "SET_MAX_ALTITUDE"}. The following screenshot shows the received message in MQTT.fx:
Download
MQTT Essentials - A Lightweight IoT Protocol by Gaston C. Hillar.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7836)
Grails in Action by Glen Smith Peter Ledbrook(7770)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6917)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6911)
Running Windows Containers on AWS by Marcio Morales(6445)
Kotlin in Action by Dmitry Jemerov(5154)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(5112)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4697)
Combating Crime on the Dark Web by Nearchos Nearchou(4682)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4440)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4374)
The Age of Surveillance Capitalism by Shoshana Zuboff(3991)
Python for Security and Networking - Third Edition by José Manuel Ortega(3929)
Learn Wireshark by Lisa Bock(3608)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3595)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3535)
Mastering Python for Networking and Security by José Manuel Ortega(3380)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3367)
Blockchain Basics by Daniel Drescher(3333)
